
export class App {
    scope: string
    constructor(scope: string){
        this.scope = scope;
    }
    static page(): App{
        return new App("1")
    }
    ref(refId: string, scope: string|null = null):HTMLElement|null{
        if(scope != null){
            return document.querySelector(`[${scope}][ref=${refId}]`)
        }
        return document.querySelector(`[ref=${refId}]`)
    }
    render(h: string){
        const parser = new DOMParser();
        var xml = parser.parseFromString(h,"text/html")
        const elements = xml.documentElement.getElementsByTagName('*');
    }
}